package com.example.demo.app;

import com.example.demo.domain.base.BaseResult;
import com.example.demo.domain.entity.BannerDO;
import com.example.demo.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Banner图
 *
 * @author haochen78
 * @date 2025/11/6 16:52
 **/
@RestController
@RequestMapping("/app/banner")
public class BannerController {
    @Autowired
    private BannerService bannerService;

    @GetMapping("/list")
    public BaseResult<List<BannerDO>> bannerList(@RequestParam String type) {
        return BaseResult.success(bannerService.list(type));
    }
}
